<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title></title>
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="../plugins/elementui/index.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <style type="text/css">
    </style>
</head>
<body class="hold-transition skin-purple sidebar-mini">
    <div id="app" style="text-align: center;">
            <div style="border: 1px solid #0f0;">
              <span>提示:若你遇到问题都可以留言在这里，管理员会及时解决你的问题<br>
                    管理员电话:18282828282<br>
                    管理员邮箱:123456789@qq.com<br>
                    在这里，你可以联系管理员修改你的错误数据或者帮助同学找回密码
              </span>
            </div>
            <div style=" border: 1px solid rgb(255, 0, 140);">
                <el-input
                type="textarea"
                placeholder="请输入内容"
                :autosize="{ minRows: 6, maxRows: 8}"
                v-model="formData.infomessage"
                show-word-limit
                >
                </el-input>
            </div>
            <div style="border: 1px solid rgb(111, 0, 255);">
                <el-select v-model="formData.thistype" style="width: 200px;" placeholder="选择你的问题类型">
                    <el-option label="寝室问题" :value="1">寝室问题</el-option>
                    <el-option label="签到问题" :value="2">签到问题</el-option>
                    <el-option label="系统问题" :value="3">系统问题</el-option>
                    <el-option label="其他问题" :value="4">其他问题</el-option>
                </el-select>
                <el-button type="primary" class="butT" @click="messageTiJiao()">提交留言</el-button>
            </div>
            
      
    </div>
</body>
<!-- 引入组件库 -->
<script src="../js/vue.js"></script>
<script src="../plugins/elementui/index.js"></script>
<script type="text/javascript" src="../js/jquery.min.js"></script>
<script src="../js/axios-0.18.0.js"></script>
<script>
    var vue = new Vue({
        el: '#app',
        data:{
            formData: {},//表单数据
        },
        methods: {
            //提交留言
            messageTiJiao(){
                //赋值给formData学号
                this.formData.stuId = sessionStorage.getItem("stuId");
                axios.post("/message/messageTiJiao",this.formData).then((res)=>{
                    if(res.data.flag){
                        this.$message.success(res.data.message);
                    }else{
                        this.$message.error(res.data.message);
                    }
                })
            },
        }
    })
</script>


</html>
